<?php /*a:7:{s:56:"E:\code\jiaoyou\application\admin\view\member\index.html";i:1599549422;s:57:"E:\code\jiaoyou\application\admin\view\public\header.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\css.html";i:1598939754;s:53:"E:\code\jiaoyou\application\admin\view\public\js.html";i:1598939754;s:58:"E:\code\jiaoyou\application\admin\view\public\tophead.html";i:1598939754;s:54:"E:\code\jiaoyou\application\admin\view\public\top.html";i:1598939753;s:57:"E:\code\jiaoyou\application\admin\view\public\footer.html";i:1598939753;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>后台系统</title>
<!--[if lt IE 9]>
<meta http-equiv="refresh" content="0;ie.html" />
<![endif]-->
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/animate.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/style.min.css" />
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/css/ffxiang.css" />
<link rel="shortcut icon" href="http://jiaoyou.com\/style/admin/img/favicon.ico">
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/jquery.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/layui/layui.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/layui/css/layui.css" />
</head>
<style type="text/css">
    #des, #des input {
        width: 40px;
        text-align: center;
    }

    #id {
        width: 78px;
    }

    .bs-checkbox {
        width: 36px;
        height: 40px
    }

    .fixed-table-toolbar .columns, .fixed-table-toolbar .search {
        margin-left: 0;
        margin-top: 0;
    }

    #title span {
        float: right;
    }

    .btn-active {
        background: #1ab394;
        color: #fff
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <?php 
$controller=strtolower(request()->controller());
$action=strtolower(request()->action());
$adminCtegory=db('category')->where(['controller'=>$controller,'function'=>$action])->cache(_cache('db'))->find();
$admin = Session::get('admin', 'mmjtAdmin');

if ($admin['id'] != 1 && $admin['type'] != 1) {
  $auth_visit = Db::name('admin_type')->where(['id' => $admin['type']])->value('data');
  $auth_visit = json_decode($auth_visit, true);
}else{
  $auth_visit = Db::name('category')->column('id');
}
if($adminCtegory){
	$adminCtegoryTid=db('category')->where(['tid'=>$adminCtegory['id'],'hideright'=>1])->order('des asc,id asc')->cache(_cache('db'))->select();
}else{
  $adminCtegoryTid=[];
}
 ?>
<div class="">
	<?php if(is_array($adminCtegoryTid) || $adminCtegoryTid instanceof \think\Collection || $adminCtegoryTid instanceof \think\Paginator): $i = 0; $__LIST__ = $adminCtegoryTid;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;
  $get=$v['get'];
  $geturl=[]; 
  if($get){
    if(strstr($get,"|")){
      $tidexplode=explode("|",$get);
      foreach($tidexplode as $va){
        $geturl[$va]=input($va);
      }
    }else{
        $geturl[$get]=input($get);
    }
  }
  $geturl['url']='-1';
  $url=url($v['controller'].'/'.$v['function'],$geturl);
   if(in_array($v['id'],$auth_visit)): ?><a onclick="add('<?php echo htmlentities($url); ?>')" href="javascript:void(0);" class="btn btn-primary "><?php echo htmlentities($v['title']); ?></a><?php endif; ?>
  <?php endforeach; endif; else: echo "" ;endif; ?>
</div>
<script type="text/javascript">
function add(url){
        layer.open({
          type: 2,
          title: '提示',
          shadeClose: false,
          shade: 0.2,
          area: ['90%', '90%'],
          skin:'shangchuantup',
          shift:-1,
          content: url,
          scrollbar: false,
          moveType: 1,
          moveOut: true
        }); 
}
</script>
        <div class="ibox-title">
<h5>
<?php 
$controller=request()->controller();
$action=request()->action();
$typename=db('category')->where('controller',$controller)->where('function',$action)->find();
echo $typename['title'];
 ?></h5>
</div>
        <div class="ibox-content">
            <div class="row row-lg">
                <div class="col-sm-12">
                    <div class="fixed-table-toolbar">
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == ''): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index'); ?>" >所有用户</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 1): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 1]); ?>">VIP</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 5): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 5]); ?>">女神</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 2): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 2]); ?>">今日注册</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 3): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 3]); ?>">男性用户</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 6): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 6]); ?>">男性认证用户</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 4): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 4]); ?>">女性用户</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 7): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 7]); ?>">女性认证用户</a>
                        <a class="btn btn-default btn-outline<?php if(input('get.type/d') == 8): ?> btn-active<?php endif; ?>" href="<?php echo url('member/index', ['type' => 8]); ?>">合伙人</a>
                    </div>
                    <div style="display:block;clear: both;"></div>
                    <div class="fixed-table-toolbar">
                        <form method="get" action="">
                            <div class="pull-left search">
                                <div class="columns columns-right btn-group pull-left">
                                    <select class="form-control" name="type">
                                        <option <?php if(input('param.type') == 'usernmae'): ?>selected="selected"<?php endif; ?> value="username">手机</option>
                                        <option <?php if(input('param.type') == 'nickname'): ?>selected="selected"<?php endif; ?> value="nickname">昵称</option>
                                        <option <?php if(input('param.type') == 'id'): ?>selected="selected"<?php endif; ?> value="id">用户ID</option>
                                    </select>
                                </div>
                                <div class="pull-right search">
                                    <button style="border-radius:0px; border:1px solid #e5e6e7; border-left:0px"
                                            class="btn btn-default btn-outline" type="submit">搜索
                                    </button>
                                </div>
                                <div class="pull-right search">
                                    <input class="form-control input-outline" type="text" name="text" value="<?php echo input('get.text', ''); ?>" />
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="example">
                        <form class="form-horizontal" method="post">
                            <table data-toggle="table">
                                <thead>
                                    <tr>
                                        <th data-align="center">ID</th>
                                        <th data-align="center">头像</th>
                                        <th data-align="center">昵称</th>
                                        <th data-align="center">性别</th>
                                        <th data-align="center">城市</th>
                                        <th data-align="center">手机</th>
                                        <th data-align="center">可用余额(金币)</th>
                                        <th data-align="center">邀请人</th>
                                        <th data-align="center">邀请码</th>
                                        <th data-align="center">注册时间</th>
                                        <th data-align="center">账号类型</th>
                                        <th data-align="center">状态</th>
                                        <th data-align="center">最后登录</th>
                                        <th data-align="center">管理</th>
                                    </tr>
                                </thead>
                                <tbody id="form">
                                    <?php if(is_array($data) || $data instanceof \think\Collection || $data instanceof \think\Paginator): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?>
                                    <tr id="id<?php echo htmlentities($v['id']); ?>" class="class">
                                        <td><?php echo htmlentities($v['id']); ?></td>
                                        <td>
                                            <img src="<?php if(empty($v['avatar'])): ?>http://jiaoyou.com\/disk/avatar/user-default.jpg<?php else: ?><?php echo htmlentities($v['avatar']); ?><?php endif; ?>"  width="40" height="40" />
                                        </td>
                                        <td><?php echo htmlentities($v['nickname']); ?><br/><?php echo htmlentities($types[$v['type']]); ?><br/><?php echo htmlentities($identitys[$v['identity']]); ?></td>
                                        <td>
                                            <?php switch($v['sex']): case "1": ?>男<?php break; case "2": ?>女<?php break; default: ?>其他
                                            <?php endswitch; ?>
                                        </td>
                                        <td><?php echo htmlentities($v['city']); ?></td>
                                        <td><?php echo htmlentities($v['username']); ?></td>
                                        <td><?php echo htmlentities($v['available_balance']); ?></td>
                                        <td>
                                            <?php if($v['parent_id']>0): ?>
                                            <p><?php echo htmlentities($v['parent_nickname']); ?></p>
                                            <?php echo htmlentities($v['parent_username']); ?>
                                            <?php endif; ?>
                                        </td>
                                        <td><?php echo htmlentities($v['invite_code']); ?></td>
                                        <td><?php echo htmlentities(date('Y-m-d H:i:s',!is_numeric($v['create_time'])? strtotime($v['create_time']) : $v['create_time'])); ?></td>
                                        <td><?php if($v['is_company']): ?>公司<?php else: ?>
                                            <?php echo htmlentities($v['level_name']); if($v['video_verify'] and $v['sex'] == 2): ?>（女神）<?php endif; ?>
                                            <?php endif; ?></td>
                                        <td>
                                            <span style="color: #<?php if($v['status'] == 1): ?>1ab394<?php else: ?>f00<?php endif; ?>;"><?php if($v['status'] == 1): ?>启<?php else: ?>禁<?php endif; ?>用</span>
                                        </td>
                                        <td>
                                            <?php if($v['last_login_time'] > 0): ?>
                                                <?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($v['last_login_time'])? strtotime($v['last_login_time']) : $v['last_login_time'])); else: ?>
                                                从未登陆
                                            <?php endif; ?>
                                        </td>
                                        <td>
                                            <div class="btn-group">
                                                <div data-toggle="dropdown" class="btn btn-primary btn-xs dropdown-toggle">
                                                    操作 <span class="caret"></span>
                                                </div>
                                                <ul class="dropdown-menu">
                                                    <li><a onClick="add('<?php echo url('Recharge/recharge',['member_id'=>$v['id'],'url'=>-1]); ?>')">充值</a></li>
                                                    <li><a onClick="add('<?php echo url('addImage',['id'=>$v['id'],'url'=>-1]); ?>')">上传照片</a></li>
                                                    <li><a href="<?php echo url('file/index', ['search_field' =>'m.id', 'search_value' => $v['id'], 'back' => 1]); ?>">查看照片</a>
                                                    <li class="divider"></li>
                                                    <li><a onClick="add('<?php echo url('add',['id'=>$v['id'],'url'=>-1]); ?>')">修改资料</a></li>
                                                    <!--<li><a onClick="del(<?php echo htmlentities($v['id']); ?>)">删除账号</a>-->
                                                </ul>
                                            </div>
                                        </td>
                                    </tr>
                                    <?php endforeach; endif; else: echo "" ;endif; ?>
                                </tbody>
                            </table>
                        </form>
                    </div>
                </div>
            </div>
            <hr>
            <div class="row row-lg">
                <div class="col-sm-12 pages"><?php echo $page; ?></div>
            </div>
        </div>
    </div>
</div>

     
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/content.min.js"></script>
    <link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.css" />
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/sweetalert/sweetalert.min.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/ffxiangIndex.js"></script>
    <script type="text/javascript" src="http://jiaoyou.com\/style/admin/js/common.js"></script>
</body>
</html>
<link rel="stylesheet" type="text/css" href="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table.min.css" />
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table.min.js"></script>
<script type="text/javascript" src="http://jiaoyou.com\/style/admin/plugins/bootstrap/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript">
    function add(url){
        layer.open({
            type: 2,
            title: '会员管理',
            shadeClose: false,
            shade: 0.2,
            area: ['80%', '95%'],
            skin:'shangchuantup',
            // shift:-1,
            content: url,
        });
    }
    function del(id) {
        swal_del(id, "<?php echo url('del'); ?>", {title:'该会员'});
    }
</script>